<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-output-edit"
			th:object="${output}">
			<input id="outputId" name="outputId" th:field="*{outputId}"
				type="hidden"> 
            <input id="goodsId" name="goodsId" th:field="*{goodsId}" class="form-control" type="hidden">
			<div class="form-group">
				<label class="col-sm-3 control-label">商品名称：</label>
				<div class="col-sm-8">
					<input id="goodsName" name="goodsName" th:field="*{goodsName}"
						class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">商品条码：</label>
				<div class="col-sm-8">
					<input id="goodsBar" name="goodsBar" th:field="*{goodsBar}"
						class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group">
			     <label class="col-sm-3 control-label">当前库存量：</label>
				<div class="col-sm-8">
					<input id="goodsNum" name="goodsNum" th:field="*{goodsNum}"
						class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">出库数量：</label>
				<div class="col-sm-8">
					<input id="outputNum" name="outputNum" th:field="*{outputNum}"
						class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">出库时间：</label>
				<div class="col-sm-8">
					<input id="outputTime" name="outputTime" th:field="*{outputTime}"
						class="form-control" type="text" readonly>
				</div>
			</div>
		   <div class="form-group">	
				<label class="col-sm-3 control-label">操作员：</label>
				<div class="col-sm-8">
					<input id="adminNick" name="adminNick" th:field="*{adminNick}" class="form-control" type="text" readonly>
				</div>
			</div>
			<!--	
			<div class="form-group">	
				<label class="col-sm-3 control-label">审核人：</label>
				<div class="col-sm-8">
					<input id="checkName" name="checkName" th:field="*{checkName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">审核时间：</label>
				<div class="col-sm-8">
					<input id="checkTime" name="checkTime" th:field="*{checkTime}" class="form-control" type="text">
				</div>
			</div> -->
			<div class="form-group">
				<label class="col-sm-3 control-label">审核状态：</label>
				<div class="col-sm-8">
					<select id="checkState" name="checkState" class="form-control"
						th:field="*{checkState}">
						<option label="未审核" value="0"></option>
						<option label="审核通过" value="1"></option>
						<option label="审核不通过" value="2"></option>
					</select>
				</div>

			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" th:field="*{remark}"
						class="form-control" type="text">
				</div>
			</div>

		</form>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">
		var prefix = ctx + "gxgw_modules/output";
		var str = $('#outputTime').val();
		str=str.replace(".0","");
		$('#outputTime').val(str);
		$("#form-output-edit").validate({
			rules:{
				outputNum:{
					required:true,
					digits: true,
					min:0
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-output-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
